<template>
	<view>
		<view class="data-box">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					<text class="cuIcon-titles"></text> 维保记录
				</view>
			</view>
			<view class="form-block">
				<view class="card">
					<view class="card-body">
						<u--form
						class="from-card"
						labelPosition="left"
						labelWidth="80"
						:model="info">
							<u-form-item
							label="维保人"
							prop="userName"
							borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.userName"
								inputAlign="right"
								border="none">
								</u--input>
							</u-form-item>
							<u-form-item
							label="车牌号"
							prop="carNum"
							borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.carNum"
								inputAlign="right"
								border="none">
								</u--input>
							</u-form-item>
							<u-form-item
							label="维保类型"
							prop="type"
							borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.type"
								inputAlign="right"
								border="none">
								</u--input>
							</u-form-item>
							<u-form-item label="维保金额" prop="amount" borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.amount"
								inputAlign="right"
								border="none"
								></u--input>
							</u-form-item>
							<u-form-item label="维保日期" prop="time" borderBottom>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.time"
								inputAlign="right"
								border="none"
								></u--input>
							</u-form-item>
							<u-form-item label="维保内容" prop="content">
								<u--textarea
								disabled
								disabledColor="#ffffff"
								v-model="info.content" >
								</u--textarea>
							</u-form-item>
							<u-form-item label="提交人" prop="time" createBy>
								<u--input
								disabled
								disabledColor="#ffffff"
								v-model="info.createBy"
								inputAlign="right"
								border="none"
								></u--input>
							</u-form-item>
						</u--form>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import { getInfo } from '@/api/maintenance.js'
	export default {
		data() {
			return {
				info:{
					userName:'',
					carNum:'',
					type:'',
					time:'',
					amount:'',
					content:'',
				},
			}
		},
		onLoad(option) {
			this.getAddOilInfo(option.id)
		},
		methods: {
			async getAddOilInfo(id){
				const { data } = await getInfo(id);
				if(data.code == 200){
					this.info = data.data
				}
			},
		}
	}
</script>

<style>
	page{
		background-color: #f6f6f6;
		color: #333333;
	}
	
</style>